home *** CD-ROM | disk | FTP | other *** search
/ AM/FM: Amiga Musicians' Freeware Magazine 13 / AM-FM 13.adf / utilities / RxTracker.doc.pp / RxTracker.doc
Text File  |  1992-11-07  |  11KB  |  301 lines

  1. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  2.                   RxTracker
  3.    - A Program for playing MED and Soundtracker modules from ARexx -
  4.  
  5.                  by
  6.               Dominic Giampaolo
  7. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  8.  
  9.        ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  10.        + NOTE  FROM  AM/FM:   This  program and all it's accompanying +
  11.        + files   are  stored  in  a  self-extracting,  LHA-compressed +
  12.        + package  in  the  "Utilities"  directory  of  this disk.  To +
  13.        + extract  all the individual files and make the program ready +
  14.        + for  use,  make  sure you are positioned on a disk where you +
  15.        + have  enough free space, and just type the path and filename +
  16.        + to the LHA-package; which is called "prog-name.RUN".  If you +
  17.        + are having problems, there is a more detailed description of +
  18.        + how to handle this extraction in the USING AM/FM article.    +
  19.        ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  20.  
  21.  
  22.     Have you noticed that AmigaVision only plays those really crappy Deluxe
  23. Music Construction Set SMUS files?  The ones that sound like they were
  24. taken from a Commodore 64?
  25.  
  26.     Well I did.
  27.  
  28.     I also noticed that SoundTracker/MED produce music that is an order of
  29. magnitude better.  As a matter of fact, if I was blindfolded and didn't
  30. know, I wouldn't believe the music was coming from the same computer.
  31.  
  32.     This is why I wrote RxTracker.  It lets you play MED and SoundTracker
  33. modules via ARexx.  This means that you are no longer forced to listen to
  34. those crappy DMCS files in your AmigaVision presentation.  It also means
  35. you can play songs from within your editor, spreadsheet, paint program, or
  36. even a telecommunications program!  Now tell me ARexx isn't the most killer
  37. thing on earth....
  38.  
  39. Oh, one quick thing.  The medplayer.library will ONLY play files saved from
  40. the 2.0 or higher version of MED.  For a module to be loaded as a MED
  41. module, the first 4 bytes of the file must be (in ascii) MMD0.  You can see
  42. if a file is a good MED module by doing "type hex <modulename>".  If the
  43. first thing you see is MMD0, you're all set.  If not, fire up MED, load the
  44. module, and just save it back out again.
  45.  
  46. ADDITIONAL NOTES : I'm now including a few ARexx scripts that you can use
  47. to test things out.  Look in the Rexx directory.  They are all very
  48. straightforward and easy to use.  You should be able to use them directly
  49. from AmigaVision or from the CLI or wherever.
  50.  
  51. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  52.  
  53.   Requirements :
  54.  
  55.        Obviously you need ARexx.
  56.  
  57.        You also need to have both medplayer.library and streplay.library in
  58. your libs: directory.  Both of them total less than 9K, and are worth
  59. sparing the disk space for (if you only have two floppies and things are
  60. really just too tight, get PathAss from a fish disk or PD archive, and it
  61. will let you split LIBS: across two disk - very handy!).  Both librariers
  62. are included here, and are copyright/left/center their respective authors
  63. (i.e. I didn't write either one).
  64.  
  65. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  66.  
  67.   How to use RxTracker :
  68.  
  69.     It is rather simple.  Just run (or runback) rxtracker.  In AmigaVision
  70. you would use the Execute icon to run rxtracker as a CLI program.  From
  71. ARexx you would do the following :
  72.  
  73.     /* fire up rxtracker in the background (assuming it's in c:) */
  74.     address command "run rxtracker"
  75.  
  76.     Or you can put it in your startup-sequence, or you can just run it
  77. manually from the CLI.
  78.  
  79. ******** NOTE:    When using the Execute Icon in AV, you need to have the
  80.         RUN command in your C: directory. On the 3000 I am using
  81.         for some reason there is no RUN command at all.  Not on the
  82.         HD or on the floppies that came with the computer.  If you
  83.         have the same problem, use a public domain RunBack instead.
  84.  
  85.  
  86.  
  87. RxTracker then opens a public port called RXTRACKER.  Now you have to use
  88. ARexx to be able to access RxTracker.
  89.  
  90.     A sample ARexx script would look like the following (assuming that
  91.     RxTracker is already running) :
  92.  
  93.        /* tell rxtracker to load a song */
  94.        address RXTRACKER LOAD "work:modules/mod1/mod.killer"
  95.  
  96.        /* now tell rxtracker to start it playing */
  97.        address RXTRACKER PLAY
  98.  
  99.        delay(300)                 /* let song play for a while */
  100.  
  101.        /* now tell it to stop */
  102.        address RXTRACKER STOP
  103.  
  104.        /* now tell it to quit */
  105.        address RXTRACKER QUIT
  106.  
  107. ******* NOTE: Again more 2.0 strangeness.  Under earlier version of ARexx
  108.           there was a function called Delay() which would wait for a
  109.           specified amount of time.  Under the 2.0 version of ARexx, it
  110.           no longer exists.  This is really gay, but that's how it is.
  111.           If you need to wait, just do : address command "wait 2"
  112.  
  113. The basic idea is very straightforward.  You tell RxTracker to load a
  114. module, by giving it the name of either a Soundtracker or MED module (it
  115. figures things out).  This loads up a "current" module.  Then you issue a
  116. PLAY command, and viola, your ears are graced with the sound of music!
  117.  
  118. To stop the noise, issue a STOP command.  One thing to note here, when you
  119. stop the music, the current module STAYS loaded.  You can start it playing
  120. again with a PLAY command, or you can UNLOAD it (or you can just issue
  121. another LOAD command).    The complete command list is right below.
  122.  
  123. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  124.  
  125. RxTracker Command List :
  126.  
  127.   This is the command list that RxTracker understands.    To use these
  128. commands you must do the following from ARexx :
  129.  
  130.     address RXTRACKER <command name>  [any arguments]
  131.  
  132. That line above instructs ARexx to "talk" to RxTracker, and give it
  133. anything on the line following the word RXTRACKER.
  134.  
  135. Here's the official command list :
  136.  
  137.  
  138. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  139. 1.  LOAD  <some filename>
  140.  
  141. Purpose :   Load into chip memory either a Soundtracker or MED module.
  142.       You do _not_ need to know which kind the file is, everything is
  143.       taken care of for you.
  144.  
  145. Notes    :   Once the module is loaded, you must issue a PLAY command if you
  146.       want to hear anything.
  147.  
  148.         It is usually a very good idea to specify a _complete_ pathname
  149.       for the song you want to play.  Otherwise, RxTracker will only be
  150.       able to see files in the current directory at the time you ran
  151.       RxTracker.  !!!THIS IS IMPORTANT TO REMEMBER!!!  When you specify
  152.       a full path name, always put it in double quotes.
  153.  
  154.         If the module name you gave wasn't really a module, you will
  155.       get back a return code of 5.
  156.  
  157. Example :      (all examples are in ARexx)
  158.  
  159.   /* load a song from dh0:music/modules */
  160.   address RXTRACKER LOAD "dh0:music/modules/mod.really_neat_song"
  161.  
  162.   /* load the song df1:mods/mod.7 */
  163.   address RXTRACKER LOAD "df1:mods/mod.7"
  164.  
  165.  
  166. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  167. 2. PLAY
  168.  
  169. Purpose  :   To play a currently loaded module.
  170.  
  171. Notes     :   If no module is currently loaded, nothing will happen.
  172.  
  173. Examples :   (in ARexx)
  174.  
  175.     /* play an already loaded module (see above) */
  176.     address RXTRACKER PLAY
  177.  
  178.  
  179. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  180. 3. STOP
  181.  
  182. Purpose  :   To stop a currently playing module.
  183.  
  184. Notes     :   If no module is being played, nothing will happen.
  185.  
  186.          After this call, the module that was playing is still in CHIP
  187.        memory, and can be started up again using a PLAY command.
  188.  
  189. Examples : (in ARexx)
  190.  
  191.      /* stop a playing module (started from the PLAY command) */
  192.      address RXTRACKER STOP
  193.  
  194.  
  195. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  196. 4.  UNLOAD
  197.  
  198. Purpose  :   Stop a currently playing module and unload it from memory.
  199.  
  200. Notes     :   You do not need to call STOP before calling this function, it
  201.        does it for you (if a module is playing).
  202.  
  203. Example  : (in ARexx)
  204.  
  205.       /* instead of using STOP, we'll just use unload */
  206.       address RXTRACKER UNLOAD
  207.  
  208.  
  209. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  210. 5. QUIT
  211.  
  212. Purpose  :   Make RxTracker quit.  Causes any currently playing modules to
  213.        be unloaded, and frees up all resources.
  214.  
  215. Notes     :   This is the only way to make RxTracker quit.  It is also very
  216.        convienent in that it stops and unloads any music that is
  217.        playing.
  218.  
  219. Example  : (in ARexx)
  220.  
  221.     /* we're done now, let's quit, make the music stop (and free up mem) */
  222.     address RXTRACKER QUIT
  223.  
  224. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  225.  
  226. Additional commands for use with MED modules :
  227.  
  228.     The medplayer.library offers a few other features that the
  229. STReplay.library does not.  These commands only work with MED modules.    If
  230. you try to use them on SoundTracker modules, nothing will happen.
  231.  
  232. 6.  FADEOUT
  233.  
  234. Purpose   :   To nicely fade out a currently playing module.
  235.  
  236. Notes      :   This command is a little weird in that it can be a
  237.         difficult to gauge when a song will have actually finished
  238.         fading out. Be careful using this command (I don't think it
  239.         will crash anything, but I could be wrong).
  240.  
  241. Example   : (in ARexx)
  242.  
  243.     /* assuming a song is already playing */
  244.     address RXTRACKER FADEOUT
  245.  
  246.     /* now wait a bit for the song to finish */
  247.     delay(150)
  248.  
  249.     /* and finally unload the song */
  250.     address RXTRACKER UNLOAD
  251.  
  252.  
  253. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  254. 7.  CONTINUE
  255.  
  256. Purpose   :   To continue playing a module at the point you called STOP
  257.  
  258. Notes      :   If you need to stop the music for whatever reason, and then
  259.         want it to pick back up where it was, use this command instead
  260.         PLAY.
  261.  
  262. Example   :
  263.  
  264.     /* first start the med module playing (assuming it's playing) */
  265.     address RXTRACKER CONTINUE
  266.  
  267.     /* now we stop it */
  268.     address RXTRACKER STOP
  269.  
  270.     delay(50)             /* wait a while */
  271.  
  272.     /* start it playing where we left off */
  273.     address RXTRACKER CONTINUE
  274.  
  275. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  276.  
  277.  
  278. That about covers it all.  If you have any questions, comments, bug
  279. reports, or just want to say hi/thanks/you're a jerk, send mail to :
  280.  
  281.     uunet!chopin!nick
  282.  
  283.      or
  284.  
  285.     nick@worthen.georgetown.edu
  286.  
  287.      or (yucky mainframe account)
  288.  
  289.     giampal@auvm.bitnet
  290.  
  291.  
  292. In the true spirit of free software, you can freely pass this program
  293. around, just keep my name attatched to it, and don't sell it for gobs of
  294. money.
  295.  
  296.  
  297. thanks,
  298.  --domininc
  299.  
  300.  
  301.